﻿Public Class ctrUsuariosSetores
    Inherits ctrPadrao

#Region "Declaração de variáveis"
    Private objUsuariosSetores As New Persistencia.perUsuariosSetores
    Private iIdSetor As Int32
#End Region

#Region "Métodos públicos"

    Public Function excluir(ByVal iIdSetor As Int32, _
                            ByVal iIDUsuario As Int32) As Boolean
        Dim bResultado As Boolean = True

        If bResultado Then
            Me.excluirUsuarioSetor(iIdSetor, iIDUsuario)
        End If

        Return bResultado

    End Function

    Private Sub excluirUsuarioSetor(ByVal iIdSetor As Int32, _
                                    ByVal iIdUsuario As Int32)

        Try
            Me.objUsuariosSetores.excluirUsuariosSetores(iIdSetor, iIdUsuario)
        Catch ex As Exception
            Throw New Exception("Exceção no método 'excluirUsuarioSetor'. " & Environment.NewLine & Environment.NewLine & ex.Message)
        End Try

    End Sub

    Public Function selecionarUsuarioSetor(ByVal iIDSetor As Int32, _
                                           ByVal iIdUsuario As Int32) As DataTable
        Try
            Return Me.objUsuariosSetores.selecionarUsuariosSetores(iIDSetor, iIdUsuario)
        Catch ex As Exception
            Throw New Exception("Exceção no método 'selecionarUsuarioSetor'. " & Environment.NewLine & Environment.NewLine & ex.Message)
        End Try
    End Function


#End Region

End Class
